package net.steamcrafted.materialiconlib.factory;

import ohos.app.Context;
import ohos.media.image.PixelMap;

public class PixelMapBuilder {

    private Context context;
    private int resId;
    private int iconColor;
    private int width, height;

    private PixelMapBuilder(Context context) {
        this.context = context;
    }

    public static PixelMapBuilder with(Context context){
        return new PixelMapBuilder(context);
    }

    public PixelMapBuilder setResId(int resId) {
        this.resId = resId;
        return this;
    }

    public PixelMapBuilder setIconColor(int iconColor) {
        this.iconColor = iconColor;
        return this;
    }

    public PixelMapBuilder setWidth(int width) {
        this.width = width;
        return this;
    }

    public PixelMapBuilder setHeight(int height) {
        this.height = height;
        return this;
    }

    public PixelMap build(){
        return PixelMapFactory.CreatePixelMap(context, resId, iconColor, width, height);
    }
}
